# 爬取猪八戒网信息

# 拿到页面源代码
# 提取和解析数据

import requests
from lxml import etree

if __name__ == '__main__':
    url = 'https://jiangsu.zbj.com/search/service/?kw=SaaS&r=2'
    resp = requests.get(url)
    resp.close()
    #print(resp.text)

    # 解析 html 信息
    html = etree.HTML(resp.text)

    # 拿到每一个服务商的 div
    divs = html.xpath('/html/body/div/div/div/div/div/div[4]/div/div/div[1]/div')

    for div in divs:    # 每一个服务商的信息
        price = div.xpath('./div/div[3]/div[1]/span/text()')#[0].strip('¥')
        print(price)








